 /*
 Kyle Kelly
 CS2110-B2 HW8
 Lib file for first GBA program
 */
#include "mylib.h"

//#define BUTTONS (*(unsigned int *) 0x04000130)
//button PRESSED = 0, button RELEASED = 1

u16 *videoBuffer = (u16 *)0x6000000;

void setPixel(int r, int c, u16 color){
	videoBuffer[OFFSET(r,c, SCREENW)] = color;
}
 
void drawRect(int r, int c, int width, int height, u16 color){
	int row, col;
	for(row = 0; row<height;row++){
		for(col = 0; col<width; col++){
			setPixel(r+row, c+col, color);
		}
	}
}

//void waitForVblank(){
//	while(SCANLINECOUNTER>160);
//	while(SCANLINECOUNTER<160);
//}
